<div class="detailsBox">
	<div class="detaiTab">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tbody>
	<tr>
	<td align="right" class="bg" width="15%">联系电话<span style="color: red;">*</span></td>
	 <td>${vo.parMobile}</td>
	 </tr>
	<tr>
		<td align="right" class="bg" width="15%">办公地址<span
			style="color: red;">*</span></td>
		<td colspan="3"> 
	     	<select id="select_provinceId" name="parOfficeProvince" value="${vo.parOfficeProvince}" disabled="true" onchange="provinceOnchange()"></select>&nbsp;&nbsp; 
	       <select id="select_areaId" name="parOfficeArea" value="${vo.parOfficeArea}" disabled="true"onchange="areaOnchange()"></select>&nbsp;&nbsp; 
	       <select id="select_cityId" name="parOfficeCity" value="${vo.parOfficeCity}" disabled="true" ></select> 
	      <input class="bn" type="text" name="parOfficeDetail" value="${vo.parOfficeDetail}" renderonly="true"/>
		</td>
	</tr>
	</tbody>
</table>
</div>
</div>
<script>
	//省市区三级联动
	provinceLoad();
	function provinceLoad(){
		var provinceCode = $("#select_provinceId").attr('value');
		$.ajax({
			type: "GET",
			url:"${crmUrl}/common/findProvinces",
			dataType:"jsonp",
			jsonp:"_callback",
			success:function(result){
					$("#select_provinceId").empty();
					 $("#select_provinceId").append("<option value=''>请选择</option>"); 
					 $("#select_areaId").empty();
					 $("#select_areaId").append("<option value=''>请选择</option>"); 
					 $("#select_cityId").empty();
					 $("#select_cityId").append("<option value=''>请选择</option>");   
					 $.each(result.data,function(key,value){
					 	if(provinceCode == value[0])
						    $("#select_provinceId").append("<option value='"+value[0]+"' selected='selected'>"+value[1]+"</option>");   
						else
							$("#select_provinceId").append("<option value='"+value[0]+"'>"+value[1]+"</option>");     
					 });
					 provinceOnchange(function(){
					 	 areaOnchange();
					 });
				    
		 		}
	 	});
     };
	
	
	function provinceOnchange(callback){
		var provinceCode = $("#select_provinceId").val() || $("#select_provinceId").attr('value');
		var areaCode = $("#select_areaId").val() || $("#select_areaId").attr('value');
		if(!provinceCode){
			 $("#select_areaId").empty();
			 $("#select_areaId").append("<option value=''>请选择</option>"); 
			 $("#select_cityId").empty();
			 $("#select_cityId").append("<option value=''>请选择</option>");   			
			 return true;
		}
		$.ajax({
			type: "GET",
			url:"${crmUrl}/common/findCityByProvinceCode",
			data:{provinceCode:provinceCode},
			dataType:"jsonp",
			jsonp:"_callback",
			success:function(result){
					 $("#select_areaId").empty();
					 $("#select_areaId").append("<option value=''>请选择</option>"); 
					 $("#select_cityId").empty();
					 $("#select_cityId").append("<option value=''>请选择</option>");   
					 $.each(result.data,function(key,value){
					 	if(areaCode == value[0])
						    $("#select_areaId").append("<option value='"+value[0]+"' selected='selected'>"+value[1]+"</option>");   
						else
					 		$("#select_areaId").append("<option value='"+value[0]+"'>"+value[1]+"</option>");   
						 
					 });
					 callback &&　callback();
		 		}
	 	});
     }
	      
	 function areaOnchange(){
		var areaCode = $("#select_areaId").val() || $("#select_areaId").attr('value');
		var cityCode = $("#select_cityId").val() || $("#select_cityId").attr('value');
		if(!areaCode){
			$("#select_cityId").empty();
		    $("#select_cityId").append("<option value=''>请选择</option>");   
			return true;
		}
		$.ajax({
			type: "GET",
			url:"${crmUrl}/common/findDistrictByCityCode",
			data:{cityCode:areaCode},
			dataType:"jsonp",
			jsonp:"_callback",
			success:function(result){
				 $("#select_cityId").empty();
				 $("#select_cityId").append("<option value=''>请选择</option>");   
				 $.each(result.data,function(key,value){
				 	if(cityCode == value[0])
					    $("#select_cityId").append("<option value='"+value[0]+"' selected='selected'>"+value[1]+"</option>");   
					else
						$("#select_cityId").append("<option value='"+value[0]+"'>"+value[1]+"</option>");   
				 });
			 }
	 	});
	
			
	}
</script>